package com.fmatos.amazingwallpapers.preferences;

import android.content.Context;
import android.util.DisplayMetrics;
import android.util.Log;

public class AmazingPreferences  {

	private static final String TAG = AmazingPreferences.class.getSimpleName();
	
//	private int statusBarHeight;
//	private int dpi;
//	private int scaledDensity;
	
	private Context context;

	public AmazingPreferences(Context context) {
		this.context = context;
	}


	public int getStatusBarHeight() {
		int resourceId = context.getResources().getIdentifier("status_bar_height", "dimen", "android");
		int result = 0;
		if (resourceId > 0) {
			result = context.getResources().getDimensionPixelSize(resourceId);
		} 
		
		Log.i(TAG, "StatusBar Height= " + result );
		
		return result;
	}

	public int getDpi() {
		// TODO Auto-generated method stub
		DisplayMetrics metrics = context.getResources().getDisplayMetrics();
		  return metrics.densityDpi;

	}

	public float getScaledDensity() {
		DisplayMetrics metrics = context.getResources().getDisplayMetrics();
		  return metrics.scaledDensity;
	}
	
}
